package com.sky.rabc.mapper;

import com.sky.rabc.dto.AddNewBackRoleDTO;
import com.sky.rabc.dto.UpdateBackRoleDTO;
import com.sky.rabc.vo.BackRoleListItemVO;
import com.sky.rabc.vo.BackRoleVO;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
public interface BackRoleMapper {
//    List<BackRoleListItemVO> getBackRoleListItem();

    /**
     * 获取所有角色Id
     *
     * @return id[]
     */
    List<Long> getAllIds();

    @Transactional
    int addNew(AddNewBackRoleDTO addNewBackRoleDTO);

    @Transactional
    int update(UpdateBackRoleDTO updateBackRoleDTO);

    int countRoleById(Long id);

    @Transactional
    int delRoleById(Long id);

    BackRoleVO getRoleById(Long id);

    List<BackRoleListItemVO> list();


}
